package com.example.controller;

import com.example.AnnotationService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className HelloController
 * @Description TODO
 * @Author YUjiangpeng
 * @Date 2020/6/9 23:20
 * @Version 1.0
 **/
@RestController
public class HelloController {
    @Reference
    private AnnotationService annotationService;
    @RequestMapping(value = "/hello", method= RequestMethod.GET)
    public String sayHello(){
        System.out.println("the class is "+annotationService);
        return annotationService.sayHello("xiao ya");
    }

    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    public String testHello(){
        return "我喜欢大长腿 ！！！";
    }
}
